// pages/Home/home.js
Page({
  data: {
    routeInfo: [
      {
        title: '配置文件',
        path: 'pages/ConfigFile/page-config',
      },
      {
        title: '字体图标',
        path: 'pages/IconFont/iconfont',
      },
      {
        title: 'WXML',
        path: 'pages/WXML/wxml',
      },
      {
        title: '事件系统',
        path: 'pages/Event/event',
      },
      {
        title: '数据更新',
        path: 'pages/DataUpdate/data-update',
      },
      {
        title: 'WXS',
        path: 'pages/WXS/wxs',
      },
      {
        title: 'WXS事件',
        path: 'pages/WXSEvent/wxs-event',
      },
      {
        title: '生命周期',
        path: 'pages/LifeCycle/life-cycle',
      },
      {
        title: '页面路由',
        path: 'pages/Route/route',
      },
      {
        title: '原生API',
        path: 'pages/NativeAPI/native-api',
      },
      {
        title: '自定义组件',
        path: 'pages/CustomizeCmpt/customize-cmpt',
      },
      {
        title: 'npm支持',
        path: 'pages/Npm/npm',
      },
    ]
  },
  handleClick: function(event){
    const item = event.currentTarget.dataset.item;
    wx.navigateTo({
      url: `/${item.path}`,
    })
  }
})